package Day11;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/17 9:15
 */
public class Test03 {
    public static void main(String[] args) {
        int[] array = {5,15,30,20,10000};
        int max  = array[0];
        for (int i = 1; i < array.length; i++) {
            //如果当前元素，比max更大，则换入
            if (array[i]>max){
                max = array[i];
            }
        }
        System.out.println("最大值:"+max);
    }
}
